package com.buffered.exam;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @author げっしょく
 * @date 2021/8/1
 */
public class Demo3 {
    public static void main(String[] args) {
        FileInputStream fis = null ;
        try {
            fis = new FileInputStream("Day12/code.txt");
            byte[] bytes = new byte[4];
            int length = 0;
            while ((length = fis.read(bytes)) != -1) {
                System.out.print(new String(bytes, 0, length));
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                fis.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }


    }
}
